package py.com.alfa.escriba.gui.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class EscribaGUIApplicationContextProvider implements ApplicationContextAware {

	private static ApplicationContext appCtx;
	private Logger log = LoggerFactory.getLogger(getClass());
	
	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		log.info("setting spring context");
		appCtx = applicationContext;
	}
	
	public static ApplicationContext getContext() {
		return appCtx;
	}

}
